using SmartLink.Domain.IServices;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SmartLink.Domain.Entity;
using SmartLink.IRepository;

namespace SmartLink.Domain.Services
{
    public class SysAttachmentServices : ISysAttachmentServices
    {
        private ISYS_AttachmentRepo _attachmentRepo;

        public SysAttachmentServices(ISYS_AttachmentRepo attachmentRepo)
        {
            _attachmentRepo = attachmentRepo;
        }

        public IEnumerable<SYS_Attachment> GetByForeignKey(string tableName, int foreignId)
        {
            return _attachmentRepo.GetByForeignKey(tableName, foreignId);
        }
    }
}
